<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/layouts/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
        <meta charset="UTF-8">
        <title>创建微信消息</title>
        <%@include file="/WEB-INF/layouts/edit-header.jsp"%>
</head>
<body>

    <div class="create-page tpanel">
        <div class="panel-content">
            <div class="container-fluid">

                <form id="createForm" class="form-horizontal">

                        <div class="form-group form-group-first">
                            <label for="toUserName" class="col-sm-2 control-label">目标</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="toUserName" name="toUserName" 
                                        value="" 
                                                placeholder="请输入目标(必填)" required 

                                        minlength="0" maxlength="100" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="fromUserName" class="col-sm-2 control-label">来源</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="fromUserName" name="fromUserName" 
                                        value="" 
                                                placeholder="请输入来源(必填)" required 

                                        minlength="0" maxlength="100" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="time" class="col-sm-2 control-label">时间</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control tcsf-datetimepicker"
                                        id="time" name="time" 
                                        2017-06-18 03:13:00
                                        placeholder="请输入时间(必填)" required 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="msgType" class="col-sm-2 control-label">类型</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="msgType" name="msgType" 
                                        value="" 
                                                placeholder="请输入类型(必填)" required 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="msgId" class="col-sm-2 control-label">消息ID</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="msgId" name="msgId" 
                                        value="" 
                                                placeholder="请输入消息ID(必填)" required 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="content" class="col-sm-2 control-label">内容</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="content" name="content" 
                                        value="" 
                                                placeholder="请输入内容" 

                                        minlength="0" maxlength="1000" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="picUrl" class="col-sm-2 control-label">图片</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="picUrl" name="picUrl" 
                                        value="" 
                                                placeholder="请输入图片" 

                                        minlength="0" maxlength="1000" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="mediaId" class="col-sm-2 control-label">素材ID</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="mediaId" name="mediaId" 
                                        value="" 
                                                placeholder="请输入素材ID" 

                                        minlength="0" maxlength="100" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="title" class="col-sm-2 control-label">标题</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="title" name="title" 
                                        value="" 
                                                placeholder="请输入标题" 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="description" class="col-sm-2 control-label">描述</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="description" name="description" 
                                        value="" 
                                                placeholder="请输入描述" 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="url" class="col-sm-2 control-label">地址</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="url" name="url" 
                                        value="" 
                                                placeholder="请输入地址" 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="locationX" class="col-sm-2 control-label">坐标X</label>
                            <div class="col-sm-8">
                                <input type="number" class="form-control"   
                                        id="locationX" name="locationX" 

                                        value="0" 
                                        digits="true"
                                                placeholder="请输入坐标X" 
                                        min="0" max="12" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="locationY" class="col-sm-2 control-label">坐标Y</label>
                            <div class="col-sm-8">
                                <input type="number" class="form-control"   
                                        id="locationY" name="locationY" 

                                        value="0" 
                                        digits="true"
                                                placeholder="请输入坐标Y" 
                                        min="0" max="12" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="scale" class="col-sm-2 control-label">缩放比例</label>
                            <div class="col-sm-8">
                                <input type="number" class="form-control"   
                                        id="scale" name="scale" 

                                        value="0" 
                                        digits="true"
                                                placeholder="请输入缩放比例" 
                                        min="0" max="10" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="label" class="col-sm-2 control-label">标签</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="label" name="label" 
                                        value="" 
                                                placeholder="请输入标签" 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="thumbMediaId" class="col-sm-2 control-label">缩略图</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="thumbMediaId" name="thumbMediaId" 
                                        value="" 
                                                placeholder="请输入缩略图" 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="format" class="col-sm-2 control-label">格式</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="format" name="format" 
                                        value="" 
                                                placeholder="请输入格式" 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="recognition" class="col-sm-2 control-label">语音识别结果</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="recognition" name="recognition" 
                                        value="" 
                                                placeholder="请输入语音识别结果" 

                                        minlength="0" maxlength="1000" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="parentId" class="col-sm-2 control-label">父级消息</label>
                            <div class="col-sm-8">
                                <input type="number" class="form-control"   
                                        id="parentId" name="parentId" 

                                        value="0" 
                                        digits="true"
                                                placeholder="请输入父级消息" 
                                        min="0" max="19" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="musicUrl" class="col-sm-2 control-label">音频</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="musicUrl" name="musicUrl" 
                                        value="" 
                                                placeholder="请输入音频" 

                                        minlength="0" maxlength="1000" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="hqMusicUrl" class="col-sm-2 control-label">高清音频</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="hqMusicUrl" name="hqMusicUrl" 
                                        value="" 
                                                placeholder="请输入高清音频" 

                                        minlength="0" maxlength="1000" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="articles" class="col-sm-2 control-label">文章</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="articles" name="articles" 
                                        value="" 
                                                placeholder="请输入文章" 

                                        minlength="0" maxlength="1000" 
                                        />
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="type" class="col-sm-2 control-label">类型（收、发）</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control"  
                                        id="type" name="type" 
                                        value="" 
                                                placeholder="请输入类型（收、发）(必填)" required 

                                        minlength="0" maxlength="45" 
                                        />
                            </div>
                        </div>

                    <div class="form-group">
                        <div class="col-sm-12" style="text-align: center;">
                                <a class="btn btn-default" href="javascript:window.history.back();">返回</a>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="submit" class="btn btn-primary" value="保存" />
                        </div>
                    </div>

                </form>

            </div>
        </div>
    </div>
                                                                        
    <script type="text/javascript">
    changeTitle('创建微信消息');
    $(function() {

        initForm('#createForm','${ctx}/admin/wechat/message/create',function(r) {
            var resp = $.parseJSON(r);
            if(resp.code == 'OK') {
                changeUrl('${ctx}/admin/wechat/message');
                topLayer.msg('保存成功', {icon: 1});
            }else {
                topLayer.msg(resp.message, {icon: 2});
            }
        });
    });
    </script>
</body>
</html>
